<?php	 	  $form=$this->beginWidget('bootstrap.widgets.BootActiveForm',array(
	'id'=>'news-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="help-block">Fields with <span class="required">*</span> are required.</p>

	<?php	 	  echo $form->errorSummary($model); ?>

	<?php	 	  echo $form->labelEx($model,'kategori_id'); ?>
	<?php	 	  echo CHtml::activeDropDownList($model,'kategori_id',CHtml::listData(NewsCategory::model()->findAll(), 'id', 'category_name'),array('prompt'=>'Choose One ...','class'=>'span5')); ?>

	<?php	 	  echo $form->textFieldRow($model,'title',array('class'=>'span5','maxlength'=>255)); ?>
	&nbsp; <a onclick='$("#mydialog").dialog("open"); return false;' href="#">Dialog</a>


		<?php	 	  echo $form->labelEx($model,'content'); ?>
		<?php	 	  $this->widget('application.extensions.ckeditor.CKEditor', array(
				'model'=>$model,
				'attribute'=>'content',
				'language'=>'en-uk',
				'editorTemplate'=>'full',
		)); ?>
		<?php	 	  echo $form->error($model,'content'); ?>



	<br />
    <?php	 	  $this->widget('bootstrap.widgets.BootButton', array('buttonType'=>'submit', 'type'=>'primary', 'icon'=>'ok white', 'label'=>'Submit')); ?>
    <?php	 	  $this->widget('bootstrap.widgets.BootButton', array('buttonType'=>'reset', 'icon'=>'remove', 'label'=>'Reset')); ?>
	

<?php	 	  $this->endWidget(); ?>
<?php	 	 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
    'id'=>'mydialog',
    'options'=>array(
        'title'=>'Buat Kategori baru',
        'width'=>400,
        'height'=>150,
        'autoOpen'=>false,
    ),
));
?>
    <?php	 	  $form=$this->beginWidget('bootstrap.widgets.BootActiveForm',array(
	'id'=>'news-category-form',
	'action'=>Yii::app()->createUrl('/newsCategory/create'),
	'enableAjaxValidation'=>false,
)); ?>

	<?php	 	  echo $form->errorSummary($model2); ?>

	<?php	 	  echo $form->textFieldRow($model2,'category_name',array('class'=>'span5','maxlength'=>255)); ?>

		<?php	 	  $this->widget('bootstrap.widgets.BootButton', array('buttonType'=>'submit', 'type'=>'primary', 'icon'=>'ok white', 'label'=>'Submit')); ?>


<?php	 	  $this->endWidget(); ?>
<?php	 	 
$this->endWidget('zii.widgets.jui.CJuiDialog');

?>
